<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
    <link rel="stylesheet" href="https://cdn.bootcss.com/bootstrap/3.3.7/css/bootstrap.min.css" integrity="sha384-BVYiiSIFeK1dGmJRAkycuHAHRg32OmUcww7on3RYdg4Va+PmSTsz/K68vbdEjh4u" crossorigin="anonymous">
</head>
<body style="background: #ffffff">
{% load demo %}
    <div class="container" style="margin-top: 20px">
        <form action="">
            <table class="table table-bordered">
            <tr>
                <td>学生姓名</td>
                <td>年龄</td>
                <td>学号</td>
                <td>所在班级</td>
                <td>操作</td>
            </tr>
            {% for item in data %}
                <tr>
                    <td>{{ item.name }}</td>
                    <td>{{ item.age }}</td>
                    <td>{{ item.snumber }}</td>
                    <td>
                        {{ item.class_name }}
{#                        {% for i in item.class_name %}#}
{#                            {% if i %}#}
{#                                {{ i }}#}
{#                            {% endif %}#}
{#                        {% endfor %}#}
                    </td>
                    <td>
                        <a href="/edit?id={{ item.id }}" class=" glyphicon glyphicon-pencil"></a>&nbsp;
                        <a href="/delstud?id={{ item.id }} " class=" glyphicon glyphicon-trash"></a>
                    </td>
                </tr>
            {% endfor %}


        </form>
    </div>

{#    <a href="/stuinfo/?page={{ up }}">上一页</a>#}
{#    <a href="">当前第{{ next }}页</a>#}
{#    <a href="/stuinfo/?page={{ next }}">下一页</a>#}
{#    <a href="">尾页</a>#}
{#    <br>#}
</table>
    {{ page|safe }}

    <a href="/addstud" class="btn btn-primary" style="margin: auto;display: block">添加</a>


{#    {% load demo %}#}

{#    {% load demo1 %}#}

{#    {{ "1,2,3,4"|abc }}#}
{#    {{ "abc"|up }}#}
</body>
</html>